﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cn.Edwon.Data;
using System.Collections;
using NHibernate.Criterion;
using NHibernate;
using System.Data;

namespace Cn.Edwon.Biz {
    public interface IBiz {
        Object Save<T>(T eo);

        Object Save(String entityName, Object eo);

        void Update(String entityName,Object eo);

        void Update<T>(T eo);

        void Delete<T>(T eo);

        void Delete(Type entityType, Object eo);

        void Delete(Type entityType, IList keys);

        void Delete<T>(Object key);

        void Delete(string queryString);
        
        int ExecuteUpdate(string rHql);

        IList<T> LoadAll<T>();

        IList<Object> LoadAll(Type entityType);

        IList<Object> LoadAll(Type entityType,String rOwnerKey);

        IList<Object> Load(Type entityType, String pk, Int32 page, Int32 pageSize, IList<ICriterion> findCondition,IList<Order> orderCondition);

        T Load<T>(object key);

        T Load<T>(object key, object ownerKey);

        void Load(object eo, object key);

        IList<T> Find<T>(string queryString);

        IList<Object> Find(string queryString, int top);

        IList<T> Find<T>(string queryString, object[] values);

        IList<Object> Search(string entityName,IList<SearchCase> fcList);

        IList<Object> ExcuteSqlQuery(String rSql);

        void ExcuteSqlUpdate(String rSql);

        void ADOExecuteNoQuerySql(String rSql);

        DataSet ADOExecuteSql(String rSql);

        DataSet ADOExcuteProc(String rProcedureName, IList<CallingParameter> rParams);
    }
}
